Passed
Pull Request — master (#134)
by
unknown
02:20
created

Token.accessToken   A

Complexity

Conditions 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
1
2
export class Token {
3
  realmId:                    string;
4
  token_type:                 string;
5
  access_token:               string;
6
  refresh_token:              string;
7
  expires_in:                 number;
8
  x_refresh_token_expires_in: number;
9
  id_token:                   string;
10
  latency:                    number;
11
  createdAt:                  number;
12
  constructor(opts?: {
13
    realmId: string,
14
    token_type: string,
15
    access_token: string,
16
    refresh_token: string,
17
    expires_in: number,
18
    x_refresh_token_expires_in: number,
19
    id_token: string,
20
    latency: number,
21
    createdAt: number
22
  });
23
  isAccessTokenValid(): boolean;
24
  isRefreshTokenValid(): boolean;
25
  accessToken(): string;
26
  refreshToken(): string;
27
  tokenType(): string;
28
  getToken(): Token;
29
  setToken(opts: {
30
    access_token: string;
31
    refresh_token: string;
32
    token_type: string;
33
    expires_in: number;
34
    x_refresh_token_expires_in: number;
35
    id_token?: string;
36
    createdAt?: number
37
  }): this;
38
  clearToken(): this;
39
}
40